package com.keepstudy.controller;

import com.keepstudy.producer.BusinessMessageSender;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Shengkang.Mo
 * @create 2021-02-09 15:27
 */
@RestController
public class RabbitMQMsgController {

    private final BusinessMessageSender businessMessageSender;

    public RabbitMQMsgController(BusinessMessageSender businessMessageSender) {
        this.businessMessageSender = businessMessageSender;
    }

    @GetMapping("/sendMsg")
    public void sendMsg(String msg) {
        businessMessageSender.sendMsg(msg);
    }
}
